import 'package:json_annotation/json_annotation.dart';
import 'user_model.dart';
part 'active_model.g.dart';



/// 列表模型数组
class ActiveModelList {
  List<ActiveModel> list;
  ActiveModelList(this.list);
  factory ActiveModelList.fromJson(List<dynamic> list) {
    return ActiveModelList(
      list.map((item) => ActiveModel.fromJson(item)).toList(),
    );
  }
}


@JsonSerializable()
class ActiveModel {
  /// 活动开始时间
  String? date;
  /// 活动结束时间
  String? end_date;
  /// 活动周期
  String? duration;
  /// 活动连接
  String? url;
  /// 活动图片
  String? action_icon;
  /// 活动名称
  String? action_title;
  /// 活动url
  String? action_url;
  /// 作者
  UserModel? author;
  /// 活动id
  String? id;
  /// 图片
  String? image;
  /// 图片高度
  int? image_h;
  /// 图片宽度
  int? image_w;
  /// 标题
  String? name;
  ///
  int? sortnum;

  ActiveModel(this.date,this.end_date,this.duration,this.url,this.action_icon,this.action_title,this.action_url,this.author,this.id,this.image,this.image_h,
      this.image_w,this.name,this.sortnum);
  factory ActiveModel.fromJson(Map<String,dynamic> json) => _$ActiveModelFromJson(json);
  Map<String, dynamic> toJson() => _$ActiveModelToJson(this);

}

